//Drop attention check failures
drop if attention==1

//Figure 1 Data (selection analyses)
prtest threat_misinfo if treatment==1,by(clicked_misinfo)
prtest method_misinfo if treatment==1,by(clicked_misinfo)


//H3 charts
//Age
poisson misinfo_score c.age##i.treatment educ info_lit trust_gov trust_media preference white male knowledge inc
margins treatment, at(age=(18(1)89) (mean) educ info_lit trust_gov trust_media preference white male knowledge inc)
marginsplot, recast(line) recastci(rarea) ci1opt(color(%13)) ci2opt(color(%13)) legend(order(3 "Factual" 4 "Misinformative") rows(1) color(%100)) xtitle(" ""Age"" ") ylabel(.4(.2)1.4) ytitle("Predicted Misinformation Score" " ") graphregion(color(white)) xlabel(20(5)90) title("") plot1opts(lwidth(.5) lpattern(dash)) plot2opts(lwidth(.5) lpattern(shortdash))

//Education
poisson misinfo_score age c.educ##i.treatment info_lit trust_gov trust_media preference white male knowledge inc
margins treatment, at(educ=(1(1)8) (mean) age info_lit trust_gov trust_media preference white male knowledge inc)
marginsplot, recast(line) recastci(rarea) ci1opt(color(%13)) ci2opt(color(%13)) legend(order(3 "Factual" 4 "Misinformative") rows(1) color(%100)) xtitle(" ""Education"" ") ytitle("Predicted Misinformation Score" " ") graphregion(color(white)) xlabel(2 "HS Diploma" 4 "Some College" 6 "Bachelor's" 8 "PhD") title("") plot1opts(lwidth(.5) lpattern(dash)) plot2opts(lwidth(.5) lpattern(shortdash))

//Information Literacy
poisson misinfo_score age educ c.info_lit##i.treatment trust_gov trust_media preference white male knowledge inc
margins treatment, at(info_lit=(0(1)5) (mean) age educ trust_gov trust_media preference white male knowledge inc)
marginsplot, recast(line) recastci(rarea) ci1opt(color(%13)) ci2opt(color(%13)) legend(order(3 "Factual" 4 "Misinformative") rows(1) color(%100)) xtitle(" ""Information Literacy"" ") ytitle("Predicted Misinformation Score" " ") graphregion(color(white)) xlabel(0(1)5) title("") plot1opts(lwidth(.5) lpattern(dash)) plot2opts(lwidth(.5) lpattern(shortdash))

//Trust in Government
poisson misinfo_score age educ info_lit c.trust_gov##i.treatment trust_media preference white male knowledge inc
margins treatment, at(trust_gov=(0(1)3) (mean) age educ info_lit trust_media preference white male knowledge inc)
marginsplot, recast(line) recastci(rarea) ci1opt(color(%13)) ci2opt(color(%13)) legend(order(3 "Factual" 4 "Misinformative") rows(1) color(%100)) xtitle(" ""Trust in Government"" ") ytitle("Predicted Misinformation Score" " ") graphregion(color(white)) xlabel(0 "None" 1 "Some" 2 "Mostly" 3 "Always") title("") plot1opts(lwidth(.5) lpattern(dash)) plot2opts(lwidth(.5) lpattern(shortdash))

//Trust in Media
poisson misinfo_score age educ info_lit trust_gov c.trust_media##i.treatment preference white male knowledge inc
margins treatment, at(trust_media=(0(1)3) (mean) age educ info_lit trust_gov preference white male knowledge inc)
marginsplot, recast(line) recastci(rarea) ci1opt(color(%13)) ci2opt(color(%13)) legend(order(3 "Factual" 4 "Misinformative") rows(1) color(%100)) xtitle(" ""Trust in Mainstream Media"" ") ytitle("Predicted Misinformation Score" " ") graphregion(color(white)) xlabel(0 "None" 1 "Some" 2 "Mostly" 3 "Always") title("") plot1opts(lwidth(.5) lpattern(dash)) plot2opts(lwidth(.5) lpattern(shortdash))

//Preference
//better way to show this?
poisson misinfo_score age educ info_lit trust_gov trust_media i.preference##i.treatment white male knowledge inc
margins treatment, at(preference=(0(1)1) (mean) age educ info_lit trust_gov trust_media white male knowledge inc)
marginsplot, recast(line) recastci(rarea) ci1opt(color(%13)) ci2opt(color(%13)) legend(order(3 "Factual" 4 "Misinformative") rows(1) color(%100)) xtitle(" ""Information Preference"" ") ytitle("Predicted Misinformation Score" " ") graphregion(color(white)) xlabel(0 "Factual" 1 "Misinformative")  ylabel(.4(.2)1.4) xlabel(-.11 " " 1.11 " ", add custom tlength(0)) title("") plot1opts(lwidth(.5) lpattern(dash)) plot2opts(lwidth(.5) lpattern(shortdash))
